package com.ruoyi.service.impl;

import java.util.List;

import com.ruoyi.domain.AdvReservbroadcast;
import com.ruoyi.mapper.AdvReservbroadcastMapper;
import com.ruoyi.service.IAdvReservbroadcastService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 【请填写功能名称】Service业务层处理
 *
 * @author ruoyi
 * @date 2024-05-27
 */
@Service
public class AdvReservbroadcastServiceImpl implements IAdvReservbroadcastService
{
    @Autowired
    private AdvReservbroadcastMapper advReservbroadcastMapper;

    /**
     * 查询【请填写功能名称】
     *
     * @param advReservbroadcastId 【请填写功能名称】主键
     * @return 【请填写功能名称】
     */
    @Override
    public AdvReservbroadcast selectAdvReservbroadcastByAdvReservbroadcastId(Long advReservbroadcastId)
    {
        return advReservbroadcastMapper.selectAdvReservbroadcastByAdvReservbroadcastId(advReservbroadcastId);
    }

    /**
     * 查询【请填写功能名称】列表
     *
     * @param advReservbroadcast 【请填写功能名称】
     * @return 【请填写功能名称】
     */
    @Override
    public List<AdvReservbroadcast> selectAdvReservbroadcastList(AdvReservbroadcast advReservbroadcast)
    {
        return advReservbroadcastMapper.selectAdvReservbroadcastList(advReservbroadcast);
    }

    /**
     * 新增【请填写功能名称】
     *
     * @param advReservbroadcast 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int insertAdvReservbroadcast(AdvReservbroadcast advReservbroadcast)
    {
        return advReservbroadcastMapper.insertAdvReservbroadcast(advReservbroadcast);
    }

    /**
     * 修改【请填写功能名称】
     *
     * @param advReservbroadcast 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int updateAdvReservbroadcast(AdvReservbroadcast advReservbroadcast)
    {
        return advReservbroadcastMapper.updateAdvReservbroadcast(advReservbroadcast);
    }

    /**
     * 批量删除【请填写功能名称】
     *
     * @param advReservbroadcastIds 需要删除的【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteAdvReservbroadcastByAdvReservbroadcastIds(Long[] advReservbroadcastIds)
    {
        return advReservbroadcastMapper.deleteAdvReservbroadcastByAdvReservbroadcastIds(advReservbroadcastIds);
    }

    /**
     * 删除【请填写功能名称】信息
     *
     * @param advReservbroadcastId 【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteAdvReservbroadcastByAdvReservbroadcastId(Long advReservbroadcastId)
    {
        return advReservbroadcastMapper.deleteAdvReservbroadcastByAdvReservbroadcastId(advReservbroadcastId);
    }

    @Override
    public boolean isReservation(String advMembersId, String advBroadcastId) {
        AdvReservbroadcast reservation = advReservbroadcastMapper.isReservation(advMembersId, advBroadcastId);
        if (reservation != null) {
            return true;
        } else {
            return false;
        }
    }

    @Override
    public List<AdvReservbroadcast> getReservationList(String advMembersId) {
        List<AdvReservbroadcast> reservationList = advReservbroadcastMapper.getReservationList(advMembersId);
        return reservationList;
    }
}
